package com.woniu.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 *  订单中包含的 具体 书籍对象
 * */

@TableName(value = "t_item")
@Data
public class Item implements Serializable {
    private Long id;
    private Long bookId;        // 书籍id
    private String bookName;    // 书籍名称
    private Double price;       // 单价
    private Integer buyCount;   // 购买数量
    private Double sumPrice;    // 该项订单的总价
    private Long orderId;       // 订单id 。关联外键
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;    // 创建时间
    private Integer state;      // 状态
    private static final long serialVersionUID = 1L;
}
